package com.frank.libandroid.util;

import java.time.LocalDate;
import java.time.Month;

public class ConstellationUtil {
    public static String getConstellation(LocalDate date) {
        Month month = date.getMonth();
        int day = date.getDayOfMonth();
        switch (month) {
            case JANUARY: {
                if (day < 20) {
                    return "摩羯座";
                }
                return "水瓶座";
            }
            case FEBRUARY: {
                if (day < 19) {
                    return "水瓶座";
                }
                return "双鱼座";
            }
            case MARCH: {
                if (day < 21) {
                    return "双鱼座";
                }
                return "白羊座";
            }
            case APRIL: {
                if (day < 20) {
                    return "白羊座";
                }
                return "金牛座";
            }
            case MAY: {
                if (day < 21) {
                    return "金牛座";
                }
                return "双子座";
            }
            case JUNE: {
                if (day < 22) {
                    return "双子座";
                }
                return "巨蟹座";
            }
            case JULY: {
                if (day < 23) {
                    return "巨蟹座";
                }
                return "狮子座";
            }
            case AUGUST: {
                if (day < 23) {
                    return "狮子座";
                }
                return "处女座";
            }
            case SEPTEMBER: {
                if (day < 23) {
                    return "处女座";
                }
                return "天秤座";
            }
            case OCTOBER: {
                if (day < 23) {
                    return "天秤座";
                }
                return "天蝎座";
            }
            case NOVEMBER: {
                if (day < 22) {
                    return "天蝎座";
                }
                return "射手座";
            }
            case DECEMBER: {
                if (day < 22) {
                    return "射手座";
                }
                return "摩羯座";
            }
            default:
                return "未知星座";
        }
    }

}
